3c849eb86b10f1ecf2330eee392e9fab611bfd56,cosigner-ethereum/src/main/java/io/emax/cosigner/ethereum/EthereumWallet.java,EthereumWallet,signTransaction,#String#String#String#,498
Before Change
public String signTransaction(String transaction, String address, String name) {
// Verify that the account is capable of sending this.
TransactionDetails txDetails = decodeRawTransaction(transaction);
if (txDetails.getAmount().compareTo(new BigDecimal(getBalance(txDetails.getFromAddress()[0])))
> 0) {
LOGGER.debug("Refusing to sign, account does not have enough balance.");
return transaction;
After Change
if (reverseMsigContracts.containsKey(address.toLowerCase(Locale.US))) {
sender = txDetails.getFromAddress()[0];
}
if (txDetails.getAmount().compareTo(new BigDecimal(getBalance(sender))) > 0) {
LOGGER.debug("Refusing to sign, account does not have enough balance.");
LOGGER.debug("Amount sent: " + txDetails.getAmount()
.divide(BigDecimal.valueOf(config.getWeiMultiplier())).toPlainString());